<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head th:replace="fragments/head::head"></head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
     <div class="row">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header" style="margin-left:15px;">
                    <h2 style="font-size: 24px;margin-top: 15px;">ERP Cloud 企业管理平台</h2>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    
                    <li class="notice">
                        <div class="text-center link-block">
                            <a class="count-info" href="javascript:;" onclick="menuOpen('/act/center/msg/index');">
                                <i class="fa fa-bell"></i> <span class="label label-warning">9</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div class="text-center link-block">
                            <a id="homePageId" class="J_menuItem" href="/home" data-index="-100" th:text="首页"></a>
                        </div>
                    </li>
                    <li th:if="${session.loginType == 2}">
                        <div class="text-center link-block">
                        账户余额：<span th:text="${actCenterCompany.balance}"></span>分
                            <a href="javascript:;" data-toggle="modal" data-target="#rechargeWin" id="rechargeId">充值</a>
                        </div>
                    </li>

                    <li th:if="${session.loginType != 2}">
                        <div class="text-center link-block">
                            账户余额：0元
                        </div>
                    </li>

                    <li>
                        <div class="text-center link-block">
                            <a class="" href="javascript:;" id="alretPwd">
                                    修改密码
                            </a>
                        </div>
                    </li>
                    <li class="exit dropdown">
                         <div class="text-center">
                            <span th:text="${session.userAccount}" th:if="${session.loginType == 2}"></span>
                            <a href="javascript:;" class="" onclick="logout();" >退出</a>
                        </div>
                        
                    </li>
                </ul>
            </nav>
        </div>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
       
        <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i></div>
        <div class="sidebar-collapse">
            <!--<div th:replace="/fragments/leftMenu :: menuUl"></div>-->

            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <span><img alt="image" class="img-circle" src="/img/profile_small.jpg"/></span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="javascript:;">
                            <span class="clear">
                               <span class="block m-t-xs">
                                   <strong class="font-bold">
                                       <div th:text="${session.userAccount}"></div>
                                   </strong>
                               </span>
                                <span class="text-muted text-xs block" >
                                    <div th:text="${session.userPhone}"></div>
                                </span>
                            </span>
                        </a>
                    </div>
                    <div class="logo-element">ERP</div>
                </li>

                <li th:each="menu,menu1Stat : ${menus}" th:class="${menu1Stat.first}? 'active' : ''">
                    <a href="javascript:;"  th:id = "menu1-+(${menu1Stat.index}+1)">
                        <i th:class="${'fa '+ menu.icon}"></i>
                        <span class="nav-label" th:text="${menu.name}"></span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li th:each="menu2,menu2Stat : ${menu.childrens}">
                            <a th:id="${'menuId-' + menu2.id}" class="J_menuItem" th:href="${menu2.url}" data-index="${menu2.id}" th:text="${menu2.name}"></a>
                        </li>

                        <!-- 用于隐藏 -->
                        <li th:if="${menu1Stat.first}" style="display: none">
                            <a th:id="syshidenmenu" class="J_menuItem" href="#" data-index="-1" text=""></a>
                        </li>
                    </ul>
                </li>

            </ul>


        </div>
    </nav>
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

                </button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" frameborder="0" seamless></iframe>
            <!--<div layout:fragment="content" id="content" ></div>-->
        </div>
        <div class="footer">
            <div class="pull-right">&copy; 2016 <a href="http://www.qzdsoft.com/" target="_blank">企智达</a>
            </div>
        </div>
    </div>
    <!--右侧部分结束-->
    <!--右侧边栏开始-->
    <!-- <div id="right-sidebar">
        <div class="sidebar-container">
    
            <ul class="nav nav-tabs navs-3">
    
                <li class="active">
                    <a data-toggle="tab" href="#tab-1">
                        <i class="fa fa-gear"></i> 主题
                    </a>
                </li>
                <li class=""><a data-toggle="tab" href="#tab-2">
                    通知
                </a>
                </li>
                <li><a data-toggle="tab" href="#tab-3">
                    项目进度
                </a>
                </li>
            </ul>
    
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="sidebar-title">
                        <h3><i class="fa fa-comments-o"></i> 主题设置</h3>
                        <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式，这些设置会被保存在本地，下次打开的时候会直接应用这些设置。</small>
                    </div>
                    <div class="skin-setttings">
                        <div class="title">主题设置</div>
                        <div class="setings-item">
                            <span>收起左侧菜单</span>
                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox"
                                           id="collapsemenu">
                                    <label class="onoffswitch-label" for="collapsemenu">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="setings-item">
                            <span>固定顶部</span>
    
                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox"
                                           id="fixednavbar">
                                    <label class="onoffswitch-label" for="fixednavbar">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="setings-item">
                                <span>
                        固定宽度
                    </span>
    
                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox"
                                           id="boxedlayout">
                                    <label class="onoffswitch-label" for="boxedlayout">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="title">皮肤选择</div>
                        <div class="setings-item default-skin nb">
                                <span class="skin-name ">
                         <a href="#" class="s-skin-0">
                             默认皮肤
                         </a>
                    </span>
                        </div>
                        <div class="setings-item blue-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-1">
                            蓝色主题
                        </a>
                    </span>
                        </div>
                        <div class="setings-item yellow-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-3">
                            黄色/紫色主题
                        </a>
                    </span>
                        </div>
                    </div>
                </div>
    
            </div>
    
        </div>
    </div> -->
</div>


<div class="modal inmodal" id="rechargeWin" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
    <div class="modal-dialog">
        <div class="modal-content animated flipInY">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">充值</h4>
            </div>
            <small class="font-bold">
                <div class="modal-body dl-box">
                    <dl class="row">
                        <dt class="col-sm-4">充值金额：</dt>
                        <dd class="col-sm-8">
                            <input type="text" name="" value="" placeholder="">（单位：元）
                        </dd>
                    </dl>
                    <dl class="row">
                        <dt class="col-sm-4">有效期：</dt>
                        <dd class="col-sm-8">
                            <input type="radio" name="zffsname" value=""><img src="/img/zhifubao.jpg" alt="">
                            <input type="radio" name="zffsname" value=""><img src="/img/weixin.jpg" alt="">
                        </dd>
                    </dl>
                    <dl class="row">
                        <dt class="col-sm-4">充值说明：</dt>
                        <dd class="col-sm-8 red">
                            可以直接转到银行卡账号：XXXXXXXXXXX，收款人：XXX <br>
                            如果选择支付宝或微信，会收取3%的手续费
                        </dd>
                    </dl>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary">保存s</button>
                </div>
            </small>
        </div>
        <small class="font-bold">small>
    </div>
    <small class="font-bold"></small>
</div>

<!-- 修改密码 -->
<div class="modal inmodal" id="modifyPassword" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal m-t" id="msgform">
                    <div class="form-group">
                        <label class="col-sm-4 control-label" style="text-align:center" >旧密码：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control formSubmit" skey="opd" emsg="请输入旧密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label" style="text-align:center" >新密码：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control formSubmit" skey="npd" emsg="请输入新密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label" style="text-align:center" >确认新密码：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control formSubmit" skey="npda" emsg="请再次输入新密码">
                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal" onclick="winClose('modifyPassword');">关闭</button>
                <button type="button" class="btn btn-primary" onclick="winFormSubmit('/sys/user/passwd?t=1', 'modifyPassword');">保存</button>
            </div>
        </div>
    </div>
</div>


<link href="/css/index.css" rel="stylesheet"/>
<link th:href="@{/layerui/css/layui.css}" rel="stylesheet">

<!--<div th:include="/fragments/js :: jsHtml"></div>-->

</body>
<script th:src="@{/layerui/layui.js?v=3.2}"></script>




<script>

    $(function () {
        setTimeout(function(){
            $("#homePageId").trigger("click");
        }, 300);
    });

    /**
     * 退出登录
     */
    function logout(){
        swal({
            title: "您确定要退出吗",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "是的，我要退出！",
            cancelButtonText: "让我再考虑一下…",
            closeOnConfirm: false,
            closeOnCancel: true
        },
        function (isConfirm) {
            if (isConfirm) {
                ajaxPostRequest("/logout", "/");
            }
        });
    }
	//修改密码
layui.use(['layer'], function(){
	$("#alretPwd").click(function(){
		 $.post('/act/center/company/alretPwd/', {"id":""}, function(str){
	          editdialogindex = layer.open({
	        	  id:"pwdupdateDialog",
	              title:"修改密码",
	              type: 1,
	              zIndex:10,
	              area: ['400px', '300px'],
	              content: str //注意，如果str是object，那么需要字符拼接。
	            });
	          }); 
		 
	});
});



</script>

</html>
